package sdfi.lee.Entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the yiqi table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="yiqi"
 */

public abstract class BaseYiqi  implements Serializable {

	public static String REF = "Yiqi";
	public static String PROP_LID = "Lid";
	public static String PROP_YIQIDESCRIBE = "Yiqidescribe";
	public static String PROP_ID = "Id";
	public static String PROP_YIQINAME = "Yiqiname";


	// constructors
	public BaseYiqi () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseYiqi (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String yiqiname;
	private java.lang.String yiqidescribe;

	// many to one
	private sdfi.lee.Entity.Lab lid;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="sequence"
     *  column="Id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: yiqiname
	 */
	public java.lang.String getYiqiname () {
		return yiqiname;
	}

	/**
	 * Set the value related to the column: yiqiname
	 * @param yiqiname the yiqiname value
	 */
	public void setYiqiname (java.lang.String yiqiname) {
		this.yiqiname = yiqiname;
	}



	/**
	 * Return the value associated with the column: yiqidescribe
	 */
	public java.lang.String getYiqidescribe () {
		return yiqidescribe;
	}

	/**
	 * Set the value related to the column: yiqidescribe
	 * @param yiqidescribe the yiqidescribe value
	 */
	public void setYiqidescribe (java.lang.String yiqidescribe) {
		this.yiqidescribe = yiqidescribe;
	}



	/**
	 * Return the value associated with the column: lid
	 */
	public sdfi.lee.Entity.Lab getLid () {
		return lid;
	}

	/**
	 * Set the value related to the column: lid
	 * @param lid the lid value
	 */
	public void setLid (sdfi.lee.Entity.Lab lid) {
		this.lid = lid;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof sdfi.lee.Entity.Yiqi)) return false;
		else {
			sdfi.lee.Entity.Yiqi yiqi = (sdfi.lee.Entity.Yiqi) obj;
			if (null == this.getId() || null == yiqi.getId()) return false;
			else return (this.getId().equals(yiqi.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}